package hotciv.variant;

import hotciv.framework.*;
import hotciv.standard.*;

public class DeltaCivWinAfterThreeSuccessfulAttacksStrategy implements WinStrategy {

	public Player getWinner(GameTesting g) {
		if(g.getPlayerInTurn() != null && g.getPlayerInTurn().getWonAttacks() >= 3) {
			System.out.println(g.getPlayerInTurn()+" wins the game after 3 successful attacks!");
			g.getPlayerInTurn().resetWonAttacks();
			System.out.println(g.getPlayerInTurn()+"' wincount reset - new game!");
			return g.getPlayerInTurn();		
		}
		else return null;
	}

}
